<style>
<!--
/* 
	Web20 Table Style
	written by Netway Media, http://www.netway-media.com
*/
table {
  border-collapse: collapse;
  border: 1px solid #666666;
  font: normal 11px verdana, arial, helvetica, sans-serif;
  color: #363636;
  background: #f6f6f6;
  text-align:left;
  }
caption {
  text-align: center;
  font: bold 16px arial, helvetica, sans-serif;
  background: transparent;
  padding:6px 4px 8px 0px;
  color: #CC00FF;
  text-transform: uppercase;
}
thead, tfoot {
background:url(bg1.png) repeat-x;
text-align:left;
height:30px;
}
thead th, tfoot th {
padding:5px;
}
table a {
color: #333333;
text-decoration:none;
}
table a:hover {
text-decoration:underline;
}
tr.odd {
background: #f1f1f1;
}
tbody th, tbody td {
padding:5px;
}
-->
</style>
<p>Hi $name</p>
<p>This is monthly auto generated report from UCMS. </p>
<p>
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
		<th scope="col">Summary</th>
	</tr>
	<tr>
		<td>Total Car available </td><td> : </td><td><?=$available?></td>
	</tr>
	<tr>
		<td>Total Sales monthly </td><td> : </td><td><?=$sales_count?></td>
	</tr>
	<tr>
		<td>Total Buy monthly</td><td> : </td><td><?=$bought?></td>
	</tr>
</table>
</p>
<br />
<p>
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td colspan="4">List of sales activities</td>
	</tr>
	<tr>
		<th scope="col" width="5%">No</th>
		<th scope="col">Model</th>
		<th scope="col">Date</th>
		<th scope="col">Type</th>
	</tr>
<?php 
$i = 1;
foreach ($sales as $sale) :

?>
	<tr class="<?php echo (($i%2) == 0) ?  "even" : "odd" ?>">
		<td><?php echo $i;?></td>
		<td><?php echo $titles[$sale['Sale']['stores_id']]?></td>
		<td><?php echo $sale['Sale']['created']?></td>
		<td><?php echo $sale['Salestype']['name']?></td>
	</tr>

<?php 
++$i;
endforeach;?>
</table>
</p>
<?php 
echo $this->Session->flash();
?>
